package com.zjp.mapper;

import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;
import java.util.Map;

public interface CommonMapper {

    @SelectProvider(method = "genQuerySQL",type = SQLProvider.class)
    List<Map<String,Object>> queryData(@Param("requestData") Map<String, Object> requestPara, @Param("repoClass") Class<?> repo);

    @DeleteProvider(method = "genDeleteSQL",type = SQLProvider.class)
    int deleteData(@Param("requestData") Map<String, Object> requestPara, @Param("repoClass") Class<?> repo);

    @UpdateProvider(method = "genUpdateSQL",type = SQLProvider.class)
    int upsertData(@Param("requestData") Map<String, Object> requestPara, @Param("repoClass") Class<?> repo);

}
